home *** CD-ROM | disk | FTP | other *** search
- Path: lassen.cnw.com!matt!matt
- From: matt@matt.fidalgo.net (Matt Gischer)
- Newsgroups: comp.lang.c
- Subject: Re: ***NEED HELP WITH CALCULATION FUNCTION*** ASAP
- Date: Mon, 18 Mar 1996 08:03:40 GMT
- Organization: Uncle Fran's Musical Forest
- Message-ID: <DoGEE5.12B@matt.fidalgo.net>
- References: <4i0mva$j0c@fountain.mindlink.net> <4if39b$d2h@castle.nando.net>
- NNTP-Posting-Host: fidnet-30.fidalgo.net
- X-Newsreader: TIN [UNIX 1.3 BETA-950824-color PL0]
-
- Bill McCarthy (actuary@nando.net) wrote:
- : >The user is allowed to enter the annual rate of interest either as a
- : >percentage eg. 15 or enter as a decimal eg. .15. If the user enters the
- : >annual rate of interest as a percentage eg. 15, then divide by 100
- : >before using it in the formula.
- : >
- : >Any ideas how I could code this test?
- :
- : Your description doesn't make any sence. One user may type 15
- : meaning 15%, another might intend 1500%. Likewise .15 may be
- : a fractional representation of 15% of a percentage representation
- : of 15 basis points.
- :
- : BTW, does any of this have anything to do with C?
- :
- : Bill McCarthy
- : actuary@nando.net
- : Wendell, NC USA
-
- It makes a lot of _sense_. It could be done easily with an if.
- if(p>1) p=p/100; would be simple enough.
-